import request from '@/utils/request'
const qs = require("qs")
/*************    班级    ***************/
//获取学校班级选项信息
export function getClassOptionList() {
  return request({
    url: '/busi/gradeoption/list',
    method: 'get'
  })
}

//根据年级查询班级信息
export function getClassesByGrade(params) {
  return request({
    url: '/busi/class/getClassesByGrade',
    method: 'get',
    params : params
  })
}

//获取班级信息
export function classList(params) {
  return request({
    url: '/busi/class/list',
    method: 'get',
    params : params
  })
}

//新增或更新班级信息
export function saveOrUpdateClass(params) {
  return request({
    url: '/busi/class/saveOrUpdate',
    method: 'post',
    data : qs.stringify(params)
  })
}

//停用/启用班级信息
export function changeClassStatus(params) {
  return request({
    url: '/busi/class/changeStatus',
    method: 'post',
    data : qs.stringify(params)
  })
}

//新增或更新班级信息
export function deleteClass(params) {
  return request({
    url: '/busi/class/delete',
    method: 'post',
    data : qs.stringify(params)
  })
}

/****************    学生    ***************/
//获取学生列表
export function getStudentList(params) {
  return request({
    url: '/busi/studentV4/list',
    method: 'get',
    params : params
  })
}

//判断学生的学籍号时是否已存在
export function getStudentCodeIsExist(params) {
  return request({
    url: '/busi/studentV4/studentCodeIsExist',
    method: 'get',
    params : params
  })
}

//新增或更新学生信息
export function saveOrUpdateStudent(params) {
  return request({
    url: '/busi/studentV4/saveOrUpdate',
    method: 'post',
    data : qs.stringify(params)
  })
}

//更新学生学籍信息
export function updateBusiStudent(params) {
  return request({
    url: '/busi/studentV4/updateBusiStudent',
    method: 'post',
    data : qs.stringify(params)
  })
}

//学生分配班级
export function supplyClass(params) {
  return request({
    url: '/busi/studentV4/supplyClass',
    method: 'post',
    data : qs.stringify(params)
  })
}

//获取学生详情
export function studentDetail(params) {
  return request({
    url: '/busi/studentV4/' + params.id,
    method: 'get',
    params : params
  })
}

//删除学生
export function deleteStudent(params) {
  return request({
    url: '/busi/studentV4/delete',
    method: 'post',
    data : qs.stringify(params)
  })
}


//获取所有班级信息
export function allClassList(params) {
  return request({
    url: '/busi/class/allList',
    method: 'get',
    params : params
  })
}

/************     学生家长    ***********/
//获取家长列表
export function parentList(params) {
  return request({
    url: '/busi/studentV4/parentList',
    method: 'get',
    params : params
  })
}

//新增或更新家长信息
export function saveOrUpdateParent(params) {
  return request({
    url: '/busi/studentV4/saveOrUpdateParent',
    method: 'post',
    data : qs.stringify(params)
  })
}

//删除家长信息
export function deleteParent(params) {
  return request({
    url: '/busi/studentV4/deleteParent',
    method: 'post',
    data : qs.stringify(params)
  })
}



/****************    教师  ***************/
//获取教师列表
export function getTeacherList(params) {
  return request({
    url: '/busi/teacherV4/list',
    method: 'get',
    params : params
  })
}
//获取教师详情
export function teacherDetail(params) {
  return request({
    url: '/busi/teacherV4/' + params.id,
    method: 'get',
    params : params
  })
}

//新增或更新学教师信息
export function saveOrUpdateTeacher(params) {
  return request({
    url: '/busi/teacherV4/saveOrUpdate',
    method: 'post',
    data : qs.stringify(params)
  })
}

//删除教师信息
export function deleteTeacher(params) {
  return request({
    url: '/busi/teacherV4/delete',
    method: 'post',
    data : qs.stringify(params)
  })
}


//更新教师职务信息
export function updateTeacherJob(params) {
  return request({
    url: '/busi/teacherV4/updateJob',
    method: 'post',
    data : qs.stringify(params)
  })
}

//教师分配部门
export function supplyOffice(params) {
  return request({
    url: '/busi/teacherV4/supplyOffice',
    method: 'post',
    data : qs.stringify(params)
  })
}

//获取部门列表
export function officeList(params) {
  return request({
    url: '/busi/teacherV4/officeList',
    method: 'get',
    params : params
  })
}
//获取教职工职务列表
export function staffJobTypeList(params) {
  return request({
    url: '/busi/teacherV4/jobTypeList',
    method: 'get',
    params : params
  })
}

/******  教职工   ******/
//教职工列表
export function staffList(params) {
  return request({
    url: '/busi/class/staffList',
    method: 'get',
    params : params
  })
}

//设置班主任
export function updateHeadTeacher(params) {
  return request({
    url: '/busi/class/updateHeadTeacher',
    method: 'post',
    data : qs.stringify(params)
  })
}

//获取词典数据
export function dictList(params) {
  return request({
    url: '/busi/dict/list',
    method: 'get',
    params : params
  })
}


/*********  场所管理  *******/
//获取场所列表
export function placeList(params) {
  return request({
    url: '/busi/place/list',
    method: 'get',
    params : params
  })
}

//新增或更新场所
export function saveOrUpdatePlace(params) {
  return request({
    url: '/busi/place/saveOrUpdate',
    method: 'post',
    data : qs.stringify(params)
  })
}

//删除场所
export function deletePlace(params) {
  return request({
    url: '/busi/place/delete',
    method: 'post',
    data : qs.stringify(params)
  })
}


/****  科目管理  ****/
//获取科目列表
export function subjectList(params) {
  return request({
    url: '/busi/subject/list',
    method: 'get',
    params : params
  })
}

//新增或更新科目
export function saveOrUpdateSubject(params) {
  return request({
    url: '/busi/subject/saveOrUpdate',
    method: 'post',
    data : qs.stringify(params)
  })
}

//删除科目
export function deleteSubject(params) {
  return request({
    url: '/busi/subject/delete',
    method: 'post',
    data : qs.stringify(params)
  })
}

//校验科目参数
export function checkSubject(params) {
  return request({
    url: '/busi/subject/check',
    method: 'get',
    params : params
  })
}


/****  课节管理  ****/
//获取课节列表
export function lessonList(params) {
  return request({
    url: '/busi/lesson/list',
    method: 'get',
    params : params
  })
}

//设置课节
export function saveLesson(params) {
  return request({
    url: '/busi/lesson/save',
    method: 'post',
    data : qs.stringify(params)
  })
}

//删除课节
export function deleteLesson(params) {
  return request({
    url: '/busi/lesson/delete',
    method: 'post',
    data : qs.stringify(params)
  })
}


/****  职务类型管理  ****/
//获取职务类型列表
export function jobTypeList(params) {
  return request({
    url: '/busi/jobType/list',
    method: 'get',
    params : params
  })
}
//获取状态正常的职务类型列表
export function normalJobTypeList(params) {
  return request({
    url: '/busi/jobType/normalList',
    method: 'get',
    params : params
  })
}

//新增或更新职务类型
export function saveOrUpdateJobType(params) {
  return request({
    url: '/busi/jobType/saveOrUpdate',
    method: 'post',
    data : qs.stringify(params)
  })
}

//删除职务类型
export function deleteJobType(params) {
  return request({
    url: '/busi/jobType/delete',
    method: 'post',
    data : qs.stringify(params)
  })
}
//职务类型输入校验
export function checkJobType(params) {
  return request({
    url: '/busi/jobType/check',
    method: 'get',
    params : params
  })
}

/*****  职务管理  *****/
//根据职务类型id获取职务信息
export function findJobByJobTypeId(params) {
  return request({
    url: '/busi/job/findByJobTypeId',
    method: 'get',
    params : params
  })
}
//获取职务列表
export function jobList(params) {
  return request({
    url: '/busi/job/list',
    method: 'get',
    params : params
  })
}

//新增或更新
export function saveOrUpdateJob(params) {
  return request({
    url: '/busi/job/saveOrUpdate',
    method: 'post',
    data : qs.stringify(params)
  })
}

//删除职务
export function deleteJob(params) {
  return request({
    url: '/busi/job/delete',
    method: 'post',
    data : qs.stringify(params)
  })
}
//职务输入校验
export function checkJob(params) {
  return request({
    url: '/busi/job/check',
    method: 'get',
    params : params
  })
}

//职务类型选择校验
export function checkJobTypeId(params) {
  return request({
    url: '/busi/job/checkJobType',
    method: 'get',
    params : params
  })
}



/*****  校历管理  *****/
//获取校历列表
export function calendarList(params) {
  return request({
    url: '/busi/schoolCalendar/list',
    method: 'get',
    params : params
  })
}

//新增或更新校历
export function saveOrUpdateCalendar(params) {
  return request({
    url: '/busi/schoolCalendar/saveOrUpdate',
    method: 'post',
    data : qs.stringify(params)
  })
}

//删除校历
export function deleteCalendar(params) {
  return request({
    url: '/busi/schoolCalendar/delete',
    method: 'post',
    data : qs.stringify(params)
  })
}
//校历校验
export function checkCalendar(params) {
  return request({
    url: '/busi/schoolCalendar/check',
    method: 'get',
    params : params
  })
}
//校历详情
export function calendarDetail(params) {
  return request({
    url: '/busi/schoolCalendar/' + params.id,
    method: 'get',
    params : params
  })
}



/*****  教职工校历管理  *****/
//获取校历列表
export function staffCalendarList(params) {
  return request({
    url: '/busi/staffSchoolCalendar/list',
    method: 'get',
    params : params
  })
}

//新增或更新校历
export function saveOrUpdateStaffCalendar(params) {
  return request({
    url: '/busi/staffSchoolCalendar/saveOrUpdate',
    method: 'post',
    data : qs.stringify(params)
  })
}

//删除校历
export function deleteStaffCalendar(params) {
  return request({
    url: '/busi/staffSchoolCalendar/delete',
    method: 'post',
    data : qs.stringify(params)
  })
}
//校历校验
export function checkStaffCalendar(params) {
  return request({
    url: '/busi/staffSchoolCalendar/check',
    method: 'get',
    params : params
  })
}
//校历详情
export function staffCalendarDetail(params) {
  return request({
    url: '/busi/staffSchoolCalendar/' + params.id,
    method: 'get',
    params : params
  })
}



/***备课系统****/


//获取备课类型
export function  getSubjectList(params) {
  return request({
    url: '/pub/subjectList',
    method: 'get',
    params : params
  })
}
//获取年级信息
export function  getSchoolGradeList(params) {
  return request({
    url: '/pub/gradeList',
    method: 'get',
    params : params
  })
}

export function deletePlLesson(params) {
  return request ({
    url: '/lesson/delete',
    method: 'get',
    params : params
  })
}

//获取班级信息
export function  getSchoolClassList(params) {
  return request({
    url: '/pub/classList',
    method: 'get',
    params : params
  })
}

//semesterList
export function  getSchoolSemesterList(params) {
  return request({
    url: '/pub/semesterList',
    method: 'get',
    params : params
  })
}
//保存编辑备课信息
export function saveOrUpdatePLesson(params) {
  return request({
    url: '/lesson/saveOrUpdate',
    method: 'post',
    data : qs.stringify(params)
  })
}
//获取备课详情
export function  getPlLessonDetail(params) {
  return request({
    url: '/lesson/detail',
    method: 'get',
    params : params
  })
}

//获取评论列表
export function  getCommentList(params) {
  return request({
    url: '/comment/list',
    method: 'get',
    params : params
  })
}

//保存评论信息
export function saveOrUpdateComment(params) {
  return request({
    url: '/comment/saveOrUpdate',
    method: 'post',
    data : qs.stringify(params)
  })
}
//删除评论
export function  deleteComment(params) {
  return request({
    url: '/comment/delete',
    method: 'get',
    params : params
  })
}

//个人备课列表
export function  personalPlLessonList(params) {
  return request({
    url: '/lesson/list',
    method: 'get',
    params : params
  })
}
//全校备课列表
export function getSchoolCourseList(params) {
  return request({
    url: '/lesson/schoolLessonList',
    method: 'get',
    params : params
  })
}


//保存/修改 后记信息
export function saveOrUpdatePostscript(params) {
  return request({
    url: '/postscript/saveOrUpdate',
    method: 'post',
    data : qs.stringify(params)
  })
}

//获取后记详情
export function  getPostscriptDetail(params) {
  return request({
    url: '/postscript/detail',
    method: 'get',
    params : params
  })
}
//根据作者获取备课
export function  getLessonListByAuthor(params) {
  return request({
    url: '/lesson/listByAuthor',
    method: 'get',
    params : params
  })
}

//根据作者获取备课
export function  getLessonListByLessonIds(params) {
  return request({
    url: '/lesson/listByIdList',
    method: 'get',
    params : params
  })
}

//获取后记列表
export function  getPostscriptList(params) {
  return request({
    url: '/postscript/list',
    method: 'get',
    params : params
  })
}


//获取全校后记列表
export function  getSchoolPostscriptList(params) {
  return request({
    url: '/postscript/schoolList',
    method: 'get',
    params : params
  })
}

//获取教职工
export function  getStaffList(params) {
  return request({
    url: '/pub/staffList',
    method: 'get',
    params : params
  })
}

//保存/修改 反馈信息
export function saveOrUpdateFeedback(params) {
  return request({
    url: '/feedback/saveOrUpdate',
    method: 'post',
    data : qs.stringify(params)
  })
}


//删除后记
export function deletePersonalPostscript(params) {
  return request({
    url: '/postscript/delete',
    method: 'get',
    params : params
  })
}

//全校反馈列表
export function schoolFeedbackList(params) {
  return request({
    url: '/feedback/list',
    method: 'get',
    params : params
  })
}
//个人反馈列表
export function personFeedbackList(params) {
  return request({
    url: '/feedback/personList',
    method: 'get',
    params : params
  })
}

//反馈详情
export function getFeedbackDetail(params) {
  return request({
    url: '/feedback/detail',
    method: 'get',
    params : params
  })
}


//个人反馈列表
export function getPersonalFeedbackList(params) {
  return request({
    url: '/feedback/personList',
    method: 'get',
    params : params
  })
}


//deleteFeedback

//删除反馈
export function deleteFeedback(params) {
  return request({
    url: '/feedback/delete',
    method: 'get',
    params : params
  })
}


